package cn.lili.controller.feign;

import cn.lili.modules.promotion.client.KanjiaActivityGoodsClient;
import cn.lili.modules.promotion.entity.dos.KanjiaActivityGoods;
import cn.lili.modules.promotion.entity.dto.KanjiaActivityGoodsDTO;
import cn.lili.modules.promotion.entity.dto.KanjiaActivityGoodsOperationDTO;
import cn.lili.modules.promotion.entity.vos.kanjia.KanjiaActivityGoodsVO;
import cn.lili.modules.promotion.service.KanjiaActivityGoodsService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: ftyy
 * @date: 2022-01-13 19:02
 * @description: 砍价Feign
 */
@RestController
@RequiredArgsConstructor
public class KanjiaActivityGoodsFeignController implements KanjiaActivityGoodsClient {

    private final KanjiaActivityGoodsService kanjiaActivityGoodsService;

    @Override
    public Boolean add(KanjiaActivityGoodsOperationDTO kanJiaActivityGoodsDTOS) {
        return kanjiaActivityGoodsService.add(kanJiaActivityGoodsDTOS);
    }

    @Override
    public KanjiaActivityGoodsDTO getKanjiaGoodsDetail(String goodsId) {
        return kanjiaActivityGoodsService.getKanjiaGoodsDetail(goodsId);
    }

    @Override
    public KanjiaActivityGoods getKanjiaGoodsBySkuId(String skuId) {
        return kanjiaActivityGoodsService.getKanjiaGoodsBySkuId(skuId);
    }

    @Override
    public KanjiaActivityGoodsVO getKanJiaGoodsVO(String id) {
        return kanjiaActivityGoodsService.getKanJiaGoodsVO(id);
    }

    @Override
    public boolean updateKanjiaActivityGoods(KanjiaActivityGoodsDTO kanjiaActivityGoodsDTO) {
        return kanjiaActivityGoodsService.updateKanjiaActivityGoods(kanjiaActivityGoodsDTO);
    }

    @Override
    public void updateById(KanjiaActivityGoodsDTO kanjiaActivityGoodsDTO) {
        kanjiaActivityGoodsService.updateById(kanjiaActivityGoodsDTO);
    }
}
